This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2001-065248, filed Mar. 8, 2001, the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a disk storage system suitable for automatic defragmentation of fragmented sequential data on a disk medium by, for example, editing.
2. Description of the Related Art
The storage capacity of a disk storage system, for example, a hard disk drive (hereinafter referred to as an xe2x80x9cHDDxe2x80x9d) is now showing a tendency to increase. In accordance with this, HDDs have come to be used as AV-HDDs for recording so-called AV (Audio Visual) data such as digital music data and digital video data, etc. Since AV data is temporally-sequenced data, it is also called an AV stream (data stream).
A user can edit AV data recorded in an HDD, using a host system. When an unnecessary section of AV data has been cut by editing, fragmentation of data always occurs, which degrades the performance of the AV-HDD. To suppress the fragmentation of data, it is necessary to rearrange data, i.e., to execute defragmentation, at an appropriate point in time.
In the prior art, to execute defragmentation, it is necessary for the user to operate, at a certain point in time, a utility program for the defragmentation. The utility program operates in the host system. As a result of the execution of this program, fragmented data in the HDD is once transferred to a memory in the host system. The fragmented data items transferred to the memory are rearranged so that they can be stored in correct order in the HDD. Then, they are written to the HDD. At this time, the fragmentation state of AV data in the HDD is eliminated, whereby the degradation of the performance of the HDD is avoided.
Jpn. Pat. Appln. KOKAI Publication No. 10-11337 describes a technique for shifting frequent-use data to an area in which such a fragmentation state has not yet developed. In this technique, the performance of data reading is enhanced by shifting frequent-use fragmented data to a contiguous area. Further, since the number of areas in which fragmented data items are stored is reduced, the amount of data to be processed by a garbage collection process is reduced.
As described above, in the prior art, to improve the fragmentation state of AV data stored in an HDD, it is necessary to execute defragmentation of AV data by activating a utility program in a host system. This technique, however, inevitably involves a degradation of the performance of the host system, although it can prevent a degradation of the performance of the HDD. Moreover, in this technique, during the time defragmentation is executed, input/output of data for, for example, reproduction of an AV stream cannot be executed between the host system and the HDD.
To prevent a degradation of the performance of the host system, a method could be devised where a function for executing defragmentation independently of the host system is imparted to the AV-HDD. In this case, however, data still cannot be input/output between the host system and the HDD during the time defragmentation is executed.
In addition, a method could be devised where a technique disclosed in the aforementioned publication No. 10-11337 is applied to a defragmentation process in the HDD, thereby executing defragmentation only on frequent-use AV data. In this case, the load applied on the HDD when executing defragmentation can be minimized, and the reading performance of frequent-use AV data can be enhanced. However, during the time defragmentation is executed, input/output of data for, for example, reproduction of an AV stream cannot be executed between the host system and the HDD as in the prior art. Furthermore, the reading performance of occasional-use AV data is as low as in the prior art.
The present invention has been developed in light of the above, and aims to enable automatic defragmentation by reproducing temporally-sequenced data in response to a request from a host system to a disk storage system, and simultaneously writing the reproduced data to a contiguous area.
According to an aspect of the invention, there is provided a disk storage system for writing data to a disk medium and reading data from the disk medium. This system comprises fragmentation determining means and controlling means. The fragmentation determining means determines, when a host system has requested the disk storage system to read temporally-sequenced data, whether the temporally-sequenced data is fragmented into a plurality of data blocks on the disk medium. The controlling means executes the control of writing the temporally-sequenced data read from the disk medium to a contiguous area on the disk medium, in parallel with the execution of the control of reading the temporally-sequenced data from the disk medium and transferring the read temporally-sequenced data to the host system, if the fragmentation determining means determines that the temporally-sequenced data is fragmented.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.